package com.sakura.eduservice.client;

import com.sakura.commonutils.R;
import com.sakura.eduservice.client.fallback.VodFileDegradeFeignClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "service-vod",fallback = VodFileDegradeFeignClient.class)
@Component
public interface VodClient {

    /**
     * 根据视频id删除阿里云视频
     * @param id @PathVariable注解一定要指定参数名称，否则出错
     */
    @DeleteMapping("/eduvod/video/removeAlyVideo/{id}")
    R removeAlyVideo(@PathVariable("id") String id);


    /**
     * 删除多个阿里云视频的方法
     * @param videoIdList 参数多个视频id  List videoIdList
     * @return
     */
    @DeleteMapping("/eduvod/video/delete-batch")
    R deleteBatch(@RequestParam("videoIdList") List<String> videoIdList);
}
